package com.fs.realm;

public class UserContext {

    private static final ThreadLocal<Integer> userThreadLocal = new ThreadLocal<>();
    public static Integer getPrinciple() {
        return userThreadLocal.get();
    }

    public static void setPrinciple(Integer principle) {
        userThreadLocal.set(principle);
    }

    public static void destroy() {
        userThreadLocal.remove();
    }

}
